<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="root">
        <div @click="handelClick">
            {{message}}
        </div>
        <item></item>
    </div>
</body>
<script>
    Vue.component('item', {
        template: '<div>hello item</div>'
    })

    var vm = new Vue({
        el: "#root",
        data: {
            message: 'hello world'
        },
        methods: {
            handelClick: function() {
                alert('hello')
            }
        }

    })
</script>

</html>